package com.jxc.model.po;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/***********************************************************************
 * Module:  DamagelistItem.java
 * Author:  Administrator
 * Purpose: Defines the Class DamagelistItem
 ***********************************************************************/

/**
 * 报损单明细
 * 
 * @pdOid 4c83f7e5-6dab-47d8-93e7-3f75336f3009
 */
@Entity
@Table(name = "KCGL_DAMAGELIST_ITEM")
public class DamagelistItem extends IdEntity implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 3092817024680505821L;
	/**
	 * 商品
	 * 
	 * @pdOid 23155d2e-add8-4ad5-afc7-7121f52d0548
	 */
	private Goods goods;
	/**
	 * 报损数量
	 * 
	 * @pdOid 8f70a6c5-b51e-440c-9984-f32d6a6d72df
	 */
	private Integer num;
	/**
	 * 报损总额
	 * 
	 * @pdOid 97f54680-e1e6-483e-aec4-8c35e550edba
	 */
	private Double total;
	/**
	 * 报损单
	 * 
	 * @pdOid 2201c145-adc0-42f9-b309-06a7f7f7e2fa
	 */
	private Damagelist damagelist;
	/**
	 * 备注
	 * 
	 */
	private String remark;

	public DamagelistItem() {
		super();
	}

	public DamagelistItem(Long id) {
		super(id);
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GOODS_ID")
	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}

	@Column(name = "NUM", length = 10)
	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	@Column(name = "TOTAL", length = 10, precision = 2)
	public Double getTotal() {
		return total;
	}

	public void setTotal(Double total) {
		this.total = total;
	}

	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
	@JoinColumn(name = "DAMAGELIST_ID")
	public Damagelist getDamagelist() {
		return damagelist;
	}

	public void setDamagelist(Damagelist damagelist) {
		this.damagelist = damagelist;
	}

}